package com.jason.entity;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;

import org.springframework.jdbc.core.RowMapper;

public class UserEntity implements RowMapper {

	/** id */
	private long id;
	/** 用户名 */
	private String userName;
	/** 性别 */
	private int sex;
	/** 电子邮箱 */
	private String email;
	/** 电话号码 */
	private String phoneNumber;
	/** 登陆名 */
	private String loginName;
	/** 登陆密码 */
	private String password;
	/** 个人说明 */
	private String description;
	/** 备注 */
	private Date remark;
	/** 最后一次登陆时间 */
	private String lastLoginTime;
	/** 登陆次数 */
	private int loginCount;
	/** 最后一次登陆ip */
	private String lastLoginIp;
	/** 注册时间 */
	private Date registerTime;
	/** 推荐人 */
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public int getSex() {
		return sex;
	}
	public void setSex(int sex) {
		this.sex = sex;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getPhoneNumber() {
		return phoneNumber;
	}
	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}
	public String getLoginName() {
		return loginName;
	}
	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public Date getRemark() {
		return remark;
	}
	public void setRemark(Date remark) {
		this.remark = remark;
	}
	public String getLastLoginTime() {
		return lastLoginTime;
	}
	public void setLastLoginTime(String lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}
	public int getLoginCount() {
		return loginCount;
	}
	public void setLoginCount(int loginCount) {
		this.loginCount = loginCount;
	}
	public String getLastLoginIp() {
		return lastLoginIp;
	}
	public void setLastLoginIp(String lastLoginIp) {
		this.lastLoginIp = lastLoginIp;
	}
	public Date getRegisterTime() {
		return registerTime;
	}
	public void setRegisterTime(Date registerTime) {
		this.registerTime = registerTime;
	}
	public Object mapRow(ResultSet result, int rowNum) throws SQLException {
		UserEntity user = new UserEntity();
		user.setId(result.getLong("id"));
		user.setUserName(result.getString("username"));
		user.setPassword(result.getString("password"));
		return user;
	}
}
